<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <script>
      let now= new Date();//Sun May 02 2021 17:39:59 GMT+0800 (中国标准时间)
      now.getFullYear();//年份
      now.getMonth();//月 0~11
      now.getDate();//日
      now.getDay()//星期几
      now.getHours();
      now.getMinutes();
      now.getSeconds();

      now.getTime();//时间戳全时间统一 1970 1.1.0:0
      new Date(1619948577617);//时间戳换时间

  </script>
</body>
</html>